<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>服装款式</title>
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
    <script src="${ctxStatic}/js/jquery-1.9.1.min.js"></script>
    <script src="${ctxStatic}/js/DateTimePicker.js"></script>
    <script src="${ctxStatic}/js/layer.js"></script>
    <script src="${ctxStatic}/js/style.js"></script>
   	<script src="${ctxStatic}/dateCalendar/WdatePicker.js"></script>
    <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
    <link rel="stylesheet" href="${ctxStatic}/css/list.css">
    <script>
    $(document).ready(function() {
    	$("select").select2();

    });
	
        //检索 
    function searchListForm() {
    	var params = $("#searchForm").serialize();
		$.post("${ctx}/material/stock/searchList",params, function(result) {
			var listHtml = result["materialStock"];
			var pageHtml = result["page"];
			$("#listHtml").html(listHtml);
			$("#paging").html(pageHtml);
			
		}, 'json');
	}
        
	//重置
	function clean() {
		$("input").val("");
		$("select").val("");
		searchListForm();
	}   
    </script>
    
    <style type="text/css">
    
    /* 物料图片 */
    .table-wlkctp{width: 80px}
    /* 物料名称/编码  */
    .table-wlkcmcbm{width: 140px}
    /* 物料类别  */
    .table-wlkclb{width: 80px}
    /* 业务类别  */
    .table-wlkcywlb{width: 80px}
    /* 物料颜色  */
    .table-wlkcys{width: 80px}
    /* 物料成分  */
    .table-wlkccf{width: 80px}
    /* 幅宽  */
    .table-wlkcfk{width: 80px}
    /* 库存数量  */
    .table-wlkcsl{width: 80px}
    /* 成本价  */
    .table-wlkccbj{width: 80px}
    /* 出厂价  */
    .table-wlkcccj{width: 80px}
    /* 库存金额  */
    .table-wlkcje{width: 80px}
    /* 描述  */
    .table-wlkcms{width: 100px}
    /* 更新日期  */
    .table-wlkcrq{width: 100px}
    
    </style>
</head>
<body>
<div class="listArea">
<form id="searchForm">
<c:set value="<%=ResourcesUtil.getConfig(\"material_Category\")%>" var="materialCategory" />
    <c:set value="<%=ResourcesUtil.getConfig(\"material_UseType\")%>" var="useType" />
	<div class="listBg">
        <div class="searchArea clearfix">
            <div class="searchLeft clearfix">
                <div class="searchInp clearfix">
                    <p>仓库名称</p>
                    <select id="" name="" >
                            <option value=""><spring:message code="quotation_style_pleaseSelect" /></option>
                     </select>
                </div>
                <div class="searchInp clearfix">
                    <p>物料类别</p>
                   <select class="width-125px" id="materialTypeCD" name="materialTypeCD">
                            <option value=""><spring:message code="material_pleaseChoosed"/></option>
	                        <c:forEach items="${fns:getDictList(materialCategory)}"   var="category">
	                            <option value="${category.itemCode}-${category.itemValue}" > 
	                                ${category.itemName}
	                            </option>
	                        </c:forEach>
	                        </select>
                </div>
                <div class="searchInp clearfix">
                    <p>业务类别</p>
                    <select class="width-125px" id="materialUseType" name="materialUseType">
                            <option value=""><spring:message code="material_pleaseChoosed"/></option>
                            <c:forEach items="${fns:getDictList(useType)}"   var="type">
                                <option value="${type.itemCode}-${type.itemValue}" > 
                                    ${type.itemName}
                                </option>
                            </c:forEach>
                        </select>
                </div>
                <div class="searchInp clearfix">
                    <p>物料名称</p>
                    <input type="text" id="materialNameCN" name="materialNameCN" value=""/>
                </div>
                <div class="searchInp clearfix">
                    <p>物料颜色</p>
                    <input type="text" id="materialColor" name="materialColor" value=""/>
                </div>
                <div class="searchInp clearfix">
                    <p>物料成分</p>
                    <input type="text" id="materialComposition" name="materialComposition" value=""/>
                </div>
                            
            </div>
            <div class="searchRight clearfix">
                <button type="button" onclick="searchListForm();"><spring:message code="commom_check" /></button>
                <button type="button" onclick="clean();"><spring:message code="common_reset" /></button>
            </div>
        </div>
    
    </form>
    
        <div class="tableArea tabBoxSm overflowX">
            <div class="tableScroll tabSm">
                <table cellpadding="0" class="tableHead">
                    <thead>
                    <tr>
                        <th><p class="table-No"><spring:message code="common_no" /></p></th>
                        <th><p class="table-wlkctp">物料图片</p></th>
                        <th><p class="table-wlkcmcbm">物料名称/编码</p></th>
                        <th><p class="table-wlkclb">物料类别</p></th>
                        <th><p class="table-wlkcywlb">业务类别</p></th>
                        <th><p class="table-wlkcys">物料颜色</p></th>
                        <th><p class="table-wlkccf">物料成分</p></th>
                        <th><p class="table-wlkcfk">幅宽</p></th>
                        <th><p class="table-wlkcsl">库存数量</p></th>
                        <th><p class="table-wlkccbj">成本价</p></th>
                        <th><p class="table-wlkcccj">出厂价</p></th>
                        <th><p class="table-wlkcje">库存金额</p></th>
                        <th><p class="table-wlkcms">描述</p></th>
                        <th><p class="table-wlkcrq">更新日期</p></th>
                    </tr>
                    </thead>
                </table>
                <table cellpadding="0" class="tableBody">
                    <tbody id="listHtml">
                    <tr>
                        
                    </tr>
                    </tbody>
                </table>
            </div>
            
        </div>
    </div>
    <div id = "paging" ></div>
</div>
   
<script type="text/javascript">
$(document).ready(function(){
	searchListForm();
	
	});

</script> 
</body>
</html>
